﻿@model IEnumerable<BOL.tbl_Url>
@if (TempData["Msg"] != null)
{ <div class="alert alert-dismissable alert-info">
        <button type="button" class="close" data-dismiss="alert">×</button>
        @TempData["Msg"].ToString()
    </div>}
<table class="table table-responsive table-bordered table-striped table-hover">
    <tr class="info">

        <th>@Html.CheckBox("selectall")</th>
        <th>
            @Html.DisplayNameFor(model => model.UrlTitle)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Url)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.UrlDesc)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.IsApproved)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.tbl_Category.CategoryName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.tbl_User.UserEmail)
        </th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.CheckBox(item.UrlId.ToString(), false, new { @class = "ckb", Id = item.UrlId })
            </td>

            <td>
                @Html.DisplayFor(modelItem => item.UrlTitle)
            </td>
            <td>
                <a target="_blank" href=@item.Url>@item.Url</a>
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.UrlDesc)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.IsApproved)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.tbl_Category.CategoryName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.tbl_User.UserEmail)
            </td>
        </tr>
    }

</table>